Python viewer state
Writing custom viewer states in Python